/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

import view.MonteCarloWindow;

/**
 *
 * @author aaaz
 */
public class MainMonteCarlo {

    public static void main(String[] args) {

        double test = 0;
        MonteCarloFunction monteCarloFunction = new MonteCarloFunction();

        String callPutFlag = "c";
        double s = 40;
        double x = 50;
        double t = 0.5;
        double r = 0.06;
        double b = 0.10;
        double v = 0.45;
        int nSteps = 168;
        int nSimulations = 10;

        if (false) { //FOR DEBUG TIMES UNCOMMENT ON MONTECARLOFUNCTIONCALL
            Runtime runtime = Runtime.getRuntime();            
            System.out.println("Allocated Memory: "+runtime.totalMemory() +" bytes");
            int[] threads = {1,2};
            for (int cThread : threads) {
                for (nSimulations = 100000; nSimulations <= 100000; nSimulations += 5000) {
                    new MonteCarloFunction().MonteCarloStandardOption(callPutFlag, s, x, t, r, b, v, nSteps, nSimulations, new MonteCarloWindow(null), cThread);
                }                
            }
        }

        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                MonteCarloWindow monteCarloWindow;
                monteCarloWindow = new MonteCarloWindow(new MonteCarloFunction());
                monteCarloWindow.setVisible(true);
            }
        });

    }
}
